<title>按钮用法大集合</title>
<input TYPE="button" NAME="view" VALUE="查看源代码"  OnClick="window.location='view-source:' +window.location.href";>
<input TYPE="button" VALUE="返回上一步" ONCLICK="history.back(-1)">
<input TYPE="button" VALUE="刷新按钮一" ONCLICK="ReloadButton()">
<script language="JavaScript">
  <!--
  function ReloadButton(){
    location.href="http://www.codefans.net";
  }
  // -->
</script>

<p>
  <input TYPE="button" VALUE="刷新按钮二" onClick="history.go(0)">
  <input TYPE="button" VALUE="回网站首页" ONCLICK="HomeButton()">
  <script language="JavaScript">
    <!--
    function HomeButton(){
      location.href="http://www.baidu.com";}
    // -->
  </script>

  <input TYPE="button" VALUE="弹出警告框" ONCLICK="AlertButton()">
  <script language="JavaScript">
    <!--
    function AlertButton(){window.alert("你知道吗？笨笨熊！)");}
    // -->
  </script>

<p>
  <input TYPE="button" VALUE="状态栏信息" ONCLICK="StatusButton()">
  <script language="JavaScript">
    <!--
    function StatusButton(){window.status="你好吗？:)";}
    // -->
  </script>

  <input TYPE="button" VALUE="背景色变换" onClick="BgButton()">
  <script language="JavaScript">
    <!--
    function BgButton(){
      if (document.bgColor=='#3399ff')
      {document.bgColor='#00ccff';}
      else{document.bgColor='#3399ff';}
    }
    // -->
  </script>

  <input TYPE="button" VALUE="打开新窗口" ONCLICK="NewWindow()">
  <script language="JavaScript">
    <!--
    function NewWindow(){
      window.open("http://www.codefans.net","","height=548,width=760,left=10,top=10,status=no,location=no,toolbar=no, directories=no,menubar=no");
    }
    // -->
  </script>